<template>
  <div>
    <h1>provideA组件</h1>
    <div class="box"></div>
  </div>
  <hr>
  <ProvideB/>
</template>

<script setup lang=ts>
import { inject,Ref } from 'vue';
import ProvideB from './ProvideB.vue';

const color = inject<Ref<string>>("color")
  
</script>

<style scoped>

.box{
  height:100px;
  width:100px;
  background: v-bind(color);
}
</style>